<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>doublebind</title>
</head>
<body>
<div id="app">
    <button @click="toggle">切换显示</button>
    <div v-if="isShow">
        v-if hello
    </div>
    <div v-show="isShow">
        hello
    </div>
</div>
<script src="./node_modules/vue/dist/vue.js"></script>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
            isShow:false
        },
        methods:{
            toggle(){
                this.isShow = !this.isShow;
            }
        }
    })
</script>
</body>
</html>